Skip to content

stdbuf: support cross-platform building#11609

Merged
Ecordonnier merged 1 commit intouutils:mainfrom
OOM-WG:main
Apr 11, 2026
Merged

stdbuf: support cross-platform building#11609
Ecordonnier merged 1 commit intouutils:mainfrom
OOM-WG:main

Conversation

@YumeYuka
Copy link
Copy Markdown
Contributor

@YumeYuka YumeYuka commented Apr 3, 2026

This PR fixes e.g. building Android targets on Windows.

Because build.rs uses #[cfg] to determine, the suffix of the platform to be built cannot be correctly determined during cross-platform building.

After changing from #[cfg] to env::var, feat_os_unix_android, which includes stdbuf, can be compiled normally. There is no actual test for other cross-platform compilation scenarios, but in theory it can be used normally.

Co-Authored-By: 白彩恋 <169267914+shirorren@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 3, 2026

GNU testsuite comparison:

Skip an intermittent issue tests/cut/bounded-memory (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/date/date-locale-hour (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/tty/tty-eof (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/dd/no-allocate is now passing!

@sylvestre sylvestre requested a review from Ecordonnier April 3, 2026 06:29
@Ecordonnier
Copy link
Copy Markdown
Collaborator

Can you please add a PR description and clarify the functional fix?

@oech3

This comment was marked as resolved.

@YumeYuka
Copy link
Copy Markdown
Contributor Author

YumeYuka commented Apr 3, 2026

Can you please add a PR description and clarify the functional fix?

Sorry a description has now been added.

@Ecordonnier Ecordonnier merged commit affce70 into uutils:main Apr 11, 2026
199 of 200 checks passed
@Ecordonnier
Copy link
Copy Markdown
Collaborator

Thanks! I was curious and checked the git history: windows -> unix cross-compilation of stdbuf has not been supported until now. It's not a recent regression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants